import {AppstoreFilled,MessageOutlined, BookOutlined, EditOutlined, HighlightOutlined, TikTokOutlined} from '@ant-design/icons';
import {Menu} from 'antd';
import './index.less'
import {useNavigate} from "react-router-dom";



const MyMenu = () => {
    const navigate = useNavigate()



    const items = [
        {
            label: '模式选择',
            key: 'selectModel',
            icon: <AppstoreFilled/>,
            children: [
                {
                    label: '作文写作',
                    key: 'CompositionWriting',
                    icon: <EditOutlined/>
                },
                {
                    label: '文章精修',
                    key: 'TextPolishing',
                    icon: <HighlightOutlined />
                },
                {
                    label: '短视频脚本',
                    key: 'ShortVideoScript',
                    icon: <TikTokOutlined />
                },
                {
                    label: '小说创作',
                    key: 'NovelCreation',
                    icon: <BookOutlined />
                },
                {
                    label: 'MindChat',
                    key: 'MindChat',
                    icon: <MessageOutlined />
                },
            ],
        },
    ];

    // 点击菜单项跳转
    const clickMenuItem = (e) => {
        console.log(e)
        navigate(e.key)
    }
    return (
        <>
            <Menu  defaultOpenKeys={['selectModel']} mode="inline" onClick={clickMenuItem} items={items} />
        </>
    )
}

export default MyMenu
